<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>邀请码管理</title>
<script>
var baseUrl = "<?php echo $this->baseUrl;?>";
</script>
<link href="<?php echo $this->baseUrl;?>/admincss/thickbox.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl;?>/admincss/mstyle.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/jquery.pack.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/js/meetcp.js" /></script>

</head>
<body>
<table class="tableA" width="100%" border="1">
  <tr>
    <td width="5%" nowrap="nowrap">编号</td>
    <td  nowrap="nowrap">操作</td>
    <td width="5%" nowrap="nowrap">邮件地址</td>
    <td width="6%" nowrap="nowrap">中文姓名</td>
    <td width="13%" nowrap="nowrap">中文头衔</td>
    <td width="6%" nowrap="nowrap">英文姓名</td>
    <td width="13%" nowrap="nowrap">英文头衔</td>
    <td width="15%" nowrap="nowrap">邀请码</td>
    <td width="14%" nowrap="nowrap">生成时间</td>
    <td width="12%" nowrap="nowrap">使用</td>
  </tr>
<?php
$ext = '&mid=' . $this->mid;
if ($this->use != null){
	$ext .= '&use=' . $this->use;
}
foreach ($this->list as $v){
$delurl=$this->url($this->baseUrl, 'invite', 'del', 'codeid='.$v['codeid'] . $ext);
$curl=$this->url($this->baseUrl, 'invite', 'change', 'codeid='.$v['codeid'] . $ext);
$use = $v['uid'] ==0?"未使用":"已注册({$v['regemail']})";
print <<<EOT
  <tr>
    <td nowrap="nowrap">{$v['codeid']}</td>
    <td nowrap="nowrap"><a href="{$curl}">修改</a>&nbsp;<a href="#" onclick="javascript:return delrow('{$delurl}', this, '{$v['email']}');">删除</a> </td>
    <td nowrap="nowrap">{$v['email']}</td>
    <td nowrap="nowrap">{$v['name']}</td>
    <td nowrap="nowrap">{$v['ncall']}</td>
    <td nowrap="nowrap">{$v['enname']}</td>
    <td nowrap="nowrap">{$v['encall']}</td>
    <td nowrap="nowrap">{$v['code']}</td>
    <td nowrap="nowrap">{$v['createtime']}</td>
    <td nowrap="nowrap">{$use}</td>
  </tr>
EOT;
}
$indexurl =$this->url($this->fullUrl, 'invite', 'list', 'nowp=1' . $ext);
$nexturl = $this->url($this->fullUrl, 'invite', 'list', 'nowp='.$this->page['next'] . $ext);
$preurl = $this->url($this->fullUrl, 'invite', 'list', 'nowp='.$this->page['previous'] . $ext);
$lasturl = $this->url($this->fullUrl, 'invite', 'list', 'nowp='.$this->page['totalpage'] . $ext);
print <<<EOT
  <tr>
    <td colspan="10">共{$this->page['totalnum']}个用户 {$this->page['nowp']}/{$this->page ['totalpage']}
<a href="{$indexurl}">首页</a>
<a href="{$nexturl}">下一页</a>
<a href="{$preurl}">前一页</a>
<a href="{$lasturl}">末页</a>		
</td>
  </tr>
<!--
EOT;
?>
</table>
</body>
</html>
